package com.ivanjava.spbdemo1.pojo.dto;

import jakarta.validation.constraints.Email;
import lombok.Getter;
import jakarta.validation.constraints.NotBlank;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

public class UserDTO {
    @Getter
    @Setter
    private Integer id;
    @Getter
    @Setter
    private String name;
    @Getter
    @Setter
    @Length(min = 6, max = 16, message = "用户密码长度必须在6-16位之间")
    @NotBlank(message = "用户密码不能为空")
    private String password;
    @Getter
    @Setter
    @Email(message = "邮箱格式不正确")
    private String email;
    @Getter
    @Setter
    @NotBlank(message = "用户电话不能为空")
    private String phone;
    @Getter
    @Setter
    private String address;
}
